﻿using System;
using System.Runtime.InteropServices;

namespace Bing_Wallpaper_Downloader
{
    internal class RDP
    {
        private const int SM_REMOTECONTROL = 0x2001;
        private const int SM_REMOTESESSION = 0x1000;

        [DllImport("user32.dll", EntryPoint = ("GetSystemMetrics"))]
        private static extern int GetSystemMetrics(int nIndex);

        public static bool IsRemote()
        {
            return Convert.ToBoolean(GetSystemMetrics(SM_REMOTESESSION));
        }
    }
}
